package com.huika.dealontop.control.myinfo.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.huika.dealontop.control.base.BaseAda;
import com.huika.dealontop.control.myinfo.holder.CouponItemHolder;
import com.huika.dealontop.support.domain.OrderDetailBean;

/**
 * Author: Victor Wu <br/>
 * Email: victor-wu*foxmail.com <br/>
 * Time: 2015/11/19 16:12 <br/>
 * Description: 订单详情 团购券 adapter
 */
public class CouponListAdapter extends BaseAda<OrderDetailBean.DataBean>{

    public CouponListAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        CouponItemHolder holder = null;
        if(view == null){
            holder = new CouponItemHolder(mContext);
            view = holder.getRootView();
        }else {
            holder = (CouponItemHolder) view.getTag();
        }
        holder.setData(this.getItem(i));
        return view;
    }


}
